{include file="public/header" /}
<body>

<div class="x-body">
    <form  class="layui-form">
        <div class="layui-form-item">
            <label for="drawing_external_id" class="layui-form-label">外来图号</label>
            <div class="layui-input-inline">
                <input type="text" id="drawing_external_id" name="drawing_external_id" lay-verify="required" autocomplete="off" class="layui-input" value="{$outsideRow.drawing_external_id}">
                <input type="hidden" id="old_drawing_external_id" name="old_drawing_external_id" value="{$outsideRow.drawing_external_id}">
                <input type="hidden" id="id" name="id" value="{$outsideRow.id}">
                <input type="hidden" id="modify_name" name="modify_name" value="{$Think.session.user.user_name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="remark" class="layui-form-label">备注</label>
            <div class="layui-input-inline">
                <input type="text" id="remark" name="remark"  autocomplete="off" class="layui-input" value="{$outsideRow.remark}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button class="layui-btn" lay-submit lay-filter="addId">
                修改
            </button>
        </div>
    </form>
</div>
<script>

    layui.use(['form'], function(){
        $ = layui.jquery;
        var form = layui.form,layer = layui.layer;

        //监听提交
        form.on('submit(addId)', function(data){
            //console.log(data);
            $.post("{:url('index/Blueprint/outsideEdit')}",data.field,function(info){
                if (info) {
                    layer.alert("修改成功", {icon: 6},function () {
                        window.parent.location.reload();  //刷新父级页面
                        // 获得frame索引
                        var index = parent.layer.getFrameIndex(window.name);
                        //关闭当前弹出层
                        parent.layer.close(index);
                    });
                }else{
                    layer.alert("修改失败", {icon: 5});
                }
            },'json');
            return false;
        });
    });
</script>
</body>

</html>